home *** CD-ROM | disk | FTP | other *** search
/ SVM Mac CD-ROM 59 / SVM Mac CD-ROM - No 59.iso / demo camisole / Quai.Dxr / 00740_le script principal du jeu des Os.ls < prev    next >
Encoding:
Text File  |  1999-04-06  |  2.4 KB  |  77 lines

  1. on exitFrame
  2.   global gDernierTemps, gAccelere, gVitesse, gTrajet, gEcartTete, gEcartGueule, gFrottement, gNumOs, gCroque, gNumChien, gBoiteOs, gCompteOs, gNiveauDuJeu, gChrono
  3.   if gNiveauDuJeu = "B" then
  4.     set vNumChrono to integer(the timer / 300)
  5.     set the castNum of sprite 47 to vNumChrono + gChrono
  6.     updateStage()
  7.     if the timer > 3600 then
  8.       go("NewGame")
  9.     end if
  10.   end if
  11.   set vTemps to the timer
  12.   set vTempsEcoule to vTemps - gDernierTemps
  13.   set gDernierTemps to vTemps
  14.   set gVitesse to ((gAccelere + gFrottement) * vTempsEcoule) + gVitesse
  15.   set gTrajet to ((gAccelere + gFrottement) * vTempsEcoule * vTempsEcoule) + (gVitesse * vTempsEcoule) + gTrajet
  16.   if gTrajet > 727 then
  17.     set gTrajet to 697
  18.     set gAccelere to 0
  19.     set gVitesse to 0.70000000000000007
  20.   else
  21.     if gTrajet < -79 then
  22.       set gTrajet to -49
  23.       set gAccelere to 0
  24.       set gVitesse to -0.70000000000000007
  25.     end if
  26.   end if
  27.   set the locH of sprite 5 to gTrajet
  28.   set the locH of sprite 7 to gTrajet + gEcartTete
  29.   set the locH of sprite 8 to gTrajet + gEcartGueule
  30.   if the mouseDown then
  31.     if gAccelere > 0 then
  32.       set gAccelere to gAccelere + 0.10000000000000001
  33.     else
  34.       if gAccelere < 0 then
  35.         set gAccelere to gAccelere - 0.10000000000000001
  36.       end if
  37.     end if
  38.   else
  39.     set gAccelere to 0
  40.   end if
  41.   if (gVitesse < 0.10000000000000001) and (gVitesse > -0.10000000000000001) then
  42.     set gVitesse to 0
  43.     set gFrottement to 0
  44.   else
  45.     set gFrottement to -gVitesse / 20
  46.   end if
  47.   set the locV of sprite 16 to the locV of sprite 16 + (2 * vTempsEcoule)
  48.   if the locV of sprite 16 >= 449 then
  49.     set the castNum of sprite 16 to gNumOs + random(4)
  50.     set the locV of sprite 16 to -25
  51.     set the locH of sprite 16 to random(540) + 10
  52.   end if
  53.   if sprite 16 intersects 8 then
  54.     set the locV of sprite 16 to 500
  55.     set gCroque to 1
  56.     set gCompteOs to gCompteOs + 1
  57.     set the castNum of sprite 15 to gBoiteOs + gCompteOs
  58.     puppetSound(1, "VALISES croqueOs")
  59.   end if
  60.   if gCroque > 0 then
  61.     set the castNum of sprite 7 to gCroque + gNumChien
  62.     set gCroque to gCroque + 1
  63.     if gCroque > 5 then
  64.       set gCroque to 0
  65.       set the castNum of sprite 7 to gNumChien
  66.       if gCompteOs = 11 then
  67.         go("finJeu")
  68.       end if
  69.     end if
  70.   end if
  71.   if not soundBusy(1) then
  72.     puppetSound(1, "VALISES moteur")
  73.     updateStage()
  74.   end if
  75.   go(the frame)
  76. end
  77.